import React, { Component } from 'react'

export default class app extends Component {
  render() {
    return (
      <div><Chlid name='lvziqiaio'></Chlid></div>
    )
  }
}

//对属性进行约束
interface IProps{
    name:string
}
// 第一个是对接口的约束 第二个是对状态
class Chlid extends Component<IProps,any>{
    render(){
        return <div>
            Chlid-{this.props.name}
        </div>
    }
}